<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="row">
    <div class="box col-md-12">
        <div class="box-inner">
            <div class="box-header well" data-original-title="">
                <h2><i class="glyphicon glyphicon-edit"></i> Student Registration</h2>

               
            </div>
            <div class="box-content">
                <form role="form" action="UpdateQuestionAction.do" method="post">
                    
                    <input type="hidden" name="id" value="${sessionScope.detail.id}">
                    <div class="form-group">
                        <label for="exampleInputEmail1">Question Description</label>
                            <textarea name="qdescription" id="editor1"  class="ckeditor">
                            ${sessionScope.detail.qdescription}
                            </textarea>
               </div>
                   
                    <div class="form-group">
                        <label for="exampleInputEmail1">Solution</label>
                         <textarea name="solution" id="editor1"  class="ckeditor">
                         ${sessionScope.detail.solution}
                            </textarea>
                    </div>
                    
                     <div class="form-group">
                        <label for="exampleInputEmail1">Topic</label>
                        <select name="topicid">
                            
                            <c:forEach var="topic" items="${sessionScope.li_alltopics}">
                                 <c:choose>
                                     <c:when test="${sessionScope.detail.topic.name eq topic.name}">
                                        <option selected="true" value="${topic.id}"><c:out value="${topic.name}"/></option>
                                        
                                    </c:when>
                                    <c:otherwise>
                                        <option value="${topic.id}">${topic.name}</option>
                                    </c:otherwise>
                                </c:choose>
                            </c:forEach>

                        </select>
                    </div>
                    
                     <div class="form-group">
                        <label for="exampleInputEmail1">Answer</label>
                        <select name="answer">
                             <c:choose>
                                     <c:when test="${sessionScope.detail.answer eq 'A'}">
                                        <option selected="true" value=A>A</option>
                                        
                                    </c:when>
                                         <c:when test="${sessionScope.detail.answer eq 'B'}">
                                        <option selected="true" value=B>B</option>
                                        
                                    </c:when>
                                         <c:when test="${sessionScope.detail.answer eq 'c'}">
                                        <option selected="true" value=C>C</option>
                                        
                                    </c:when>
                                         <c:when test="${sessionScope.detail.answer eq 'D'}">
                                        <option selected="true" value=D>D</option>
                                        
                                    </c:when>
                                    <c:otherwise>
                                        <option value=A><c:out value="A"/></option>
                            <option value=B>B</option>
                            <option value=C>C</option>
                            <option value=D>D</option>
                                    </c:otherwise>
                                </c:choose>
                           
                        </select>
                    </div>
                    
                    
                    <div class="form-group">
                    <button type="submit" class="btn btn-default">Submit</button>
                </form>

           
        </div>
    </div>
    <!--/span-->

</div><!--/row-->

    <!-- content ends -->
    </div><!--/#content.col-md-0-->
</div>